Deficits in movement initiation, control and variability constitute the core dysfunctions of neurological disease, but we still don't know how these processes are implemented in the brain. The main obstacle is the sheer complexity of brain pathways for movement. The mammalian motor system is a distributed group of neural circuits, which are in turn comprised of complex microcircuits and specific cell types. Because we don't know how these small circuit elements influence behavior, current treatments lack effectiveness and specificity. To address this problem, we developed a panel of new technologies that will allow us to define how previously inaccessible microcircuits control motor behavior. First, we invented a touch-sensing joystick that quantifies mouse forelimb trajectories with unprecedented (micron-millisecond) spatiotemporal resolution. Second, we incorporate this joystick into automated, computer-controlled homecages that perform real-time behavioral analysis and high-throughput behavioral training. Third, we devise a new way of doing high-throughput optogenetics in untethered mice using newly available red-shifted opsins. Finally, we demonstrate for the first time that mice can learn complex center-out forelimb tasks similar to ones long used in primates. By establishing a new, sophisticated motor learning paradigm in mice - a tractable model system with powerful genetic tools - we are now poised to selectively manipulate neural activity in large batches of behaving animals. First, we will perform projection-specific optogenetic silencing to determine how each of fourteen pathways converging on mouse forelimb motor cortex controls movement initiation and variability in the joystick trajectories. Next, we will use Cre-transgenic mouse lines to test how distinct layers inside forelimb cortex differentially control these processes. For both of these experiments, real-time behavioral analysis will enable optogenetic manipulations to be time-locked to specific task events and animal postures, as well as at distinct stages of skill learning. In summary, the proposed work combines unprecedented readout of motor output with unprecedented tools for manipulating previously inaccessible parts of the mammalian motor system. Our new behavioral and experimental paradigm will identify yet-to-be discovered circuits controlling movement initiation, variability and learning. If successful, it will no longer be so mysterious where tremos, dystonias, akinesias and choreas come from. We will be able to point to specific pathways and cell types positioned to cause specific deficits, which in turn will provide a roadmap towards the next generation of more targeted therapies.